<?php 
echo '<?xml version="1.0" encoding="utf-8"?>' . "
";
?>
<rss version="2.0"
	xmlns:media="http://search.yahoo.com/mrss/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title><?php echo $feed_name; ?></title>

    <link><?php echo $feed_url; ?></link>
    <description><?php echo $page_description; ?></description>
    <dc:language><?php echo $page_language; ?></dc:language>
    <dc:creator><?php echo $creator_email; ?></dc:creator>

    <dc:rights>Copyright <?php echo gmdate("Y", time()); ?></dc:rights>
    <admin:generatorAgent rdf:resource="http://solaitra.tuxfamily.org/" />

    <?php foreach($contents as $item): ?>
    
	<item>
		<title><?php echo xml_convert($item['title']); ?></title>
		<link><?php echo $item['url'] ?></link>
		<guid><?php echo $item['url'] ?></guid>
		<author><?php echo $item['author'] ?></author>
		<description><![CDATA[<?php echo nl2br($item['body']) ?>]]></description>
		<pubDate><?php echo date ('r', $item['date']);?></pubDate>
		<enclosure url="<?php echo $item['img'] ?>" length="" type="image/jpeg"/>
		<?php if(isset($item['media'])): $media = $item['media']; ?>
		<media:title type='plain'><?php echo $media['title'] ?></media:title>
        <media:description type='plain'><?php echo $media['description'] ?></media:description>
        <media:content 
			url='<?php echo $media['o'] ?>'
			type='image/jpeg'
            medium='image'>
		</media:content>
         <media:thumbnail
            url='<?php echo $media['s'] ?>'
			width='100' height='100'>
		</media:thumbnail>
        <media:thumbnail
            url='<?php echo $media['m'] ?>'
			width='300' height='250'>
		</media:thumbnail>
		<?php endif; ?>
	</item>

        
    <?php endforeach; ?>
    
    </channel>
</rss>  
